Skip to content

Reduce false-positive “New Music Update” issues by diffing net-new music links#274

Merged
DavidKRK merged 3 commits into
gh-pagesfrom
copilot/fix-placeholder-youtube-entries
Jun 3, 2026
Merged

Reduce false-positive “New Music Update” issues by diffing net-new music links#274
DavidKRK merged 3 commits into
gh-pagesfrom
copilot/fix-placeholder-youtube-entries

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2026

music-social was still opening “New Music Update” issues on non-content edits in music.html (e.g., rewrites/format churn in the auto-generated YouTube block).
This PR narrows detection to actual new music links introduced in <!-- YOUTUBE-AUTO-START --> ... <!-- YOUTUBE-AUTO-END -->.

  • Detection logic hardening

    • Replaced “added-line contains music domain” heuristic with old vs new link-set comparison inside the auto block.
    • Issue creation now triggers only when links exist in new state and are absent from previous state (comm -13).
  • Link matching scope

    • Added explicit patterns for:
      • YouTube watch URLs
      • YouTube shorts URLs
      • youtu.be short URLs
      • SoundCloud track URLs
      • Bandcamp URLs (including subdomains)
  • Deterministic comparison

    • Enforced locale-stable sorting (LC_ALL=C sort -u + LC_ALL=C comm) to keep set-diff behavior consistent across runners.
extract_music_links() {
  echo "$1" | grep -oiE "$MUSIC_LINK_PATTERN" | LC_ALL=C sort -u
}

if extract_music_links "$NEW_MUSIC_BLOCK" | grep -q .; then
  NEW_LINKS_ONLY=$(LC_ALL=C comm -13 \
    <(extract_music_links "$OLD_MUSIC_BLOCK") \
    <(extract_music_links "$NEW_MUSIC_BLOCK") || true)
fi

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copilot AI linked an issue Jun 3, 2026 that may be closed by this pull request
6 tasks
Copilot AI changed the title [WIP] Fix filter placeholder YouTube entries from music sync Reduce false-positive “New Music Update” issues by diffing net-new music links Jun 3, 2026
Copilot AI requested a review from DavidKRK June 3, 2026 22:20
@DavidKRK DavidKRK marked this pull request as ready for review June 3, 2026 22:26
Copilot AI review requested due to automatic review settings June 3, 2026 22:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the music-social workflow’s “New Music Update” trigger by comparing the set of music links found inside the <!-- YOUTUBE-AUTO-START --> … <!-- YOUTUBE-AUTO-END --> block between the previous and current versions of music.html, and only opening an issue when net-new links are detected.

Changes:

  • Replaced the prior “added lines contain a music domain” heuristic with an old-vs-new link set diff (comm -13) scoped to the auto-generated YouTube block.
  • Expanded link matching to cover YouTube watch/shorts/youtu.be URLs, SoundCloud URLs, and Bandcamp (including subdomains).
  • Enforced locale-stable sorting for deterministic set comparisons (LC_ALL=C sort -u, LC_ALL=C comm).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +83
extract_music_links() {
echo "$1" | grep -oiE "$MUSIC_LINK_PATTERN" | LC_ALL=C sort -u
}
Copy link
Copy Markdown
Owner

@DavidKRK DavidKRK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le correctif est clair et améliore bien la détection des vrais nouveaux liens musicaux en comparant l’état précédent et l’état actuel du bloc auto-généré.
La logique est plus robuste et devrait réduire les faux positifs. Rien à signaler de bloquant.

@DavidKRK DavidKRK merged commit 3814177 into gh-pages Jun 3, 2026
15 checks passed
@DavidKRK DavidKRK deleted the copilot/fix-placeholder-youtube-entries branch June 3, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🎵 New Music Update — 03/06/2026 18:05:05

3 participants